<?php
session_start();
error_reporting(0);
if($_SESSION['username']!="")
{
?>
<!DOCTYPE html>
<html lang="en">
 <head>
     <? include "./include/head.php"; ?>
	 <? include "./include/js.php"; ?>
  </head>
  <body>
	<? include "./include/body.php"; 
	   include "./config/connection.php";
	?>
	
	<?php
		$key=$_GET["id_produk"];
		mysql_connect("localhost","root");
		mysql_select_db("db_sipemenang");
		$sql=mysql_query("delete from produk where id_produk='".$key."'");
		if ($sql){
		echo"<script>alert('Data Telah Berhasil Dihapus')</script>";
		echo"<script>history.back();</script>"; 
		}
			else {echo mysql_error();}
	?>
    <? include "./include/menubawah.php"; ?>
  </body>
</html>
<?php
    }
else {
    include 'warning.php';
}
?>